<template>
    <div>
        <div class="cookies_warp">
            <div class="cookies_content">
                <div class="cookies_title">{{$t('vr.cookiesTitle')}}<span class="closeBtn" @click="closebtn"><img src="@/assets/imgs/header_close.png" /></span></div>
                <p class="cookies_p">{{$t('vr.cookiesContentLeft')}}<span class="cookies_btn" @click="showDialogVisible">{{$t('vr.cookiesContentCenter')}}</span>{{$t('vr.cookiesContentRight')}}</p>
                <p class="cookies_last">{{$t('vr.cookiesFooter')}}</p>
                <div class="cookies_submit" @click="saveCookies2">ok</div>
            </div>
        </div>
        <DiaLog :dialogVisible="dialogVisible"  @closeDialog="closeDialog"/>
    </div>
</template>
<script>
import { mapState, mapMutations } from 'vuex'
import DiaLog from 'componentsPath/cookiesWrap/pc/dialog'
export default {
    data() {
        return {
            dialogVisible:false
        };
    },
    components: {
        DiaLog
    },
    computed: {
        ...mapState(["lang"])
    },
    methods: {
        ...mapMutations(['saveCookie']), // 修改vuex中的登录数据
        saveCookies2() {
            this.$emit('saveCookies2')
        },
        closebtn() {
            this.$emit('closeFun')
        },
        closeDialog() {
            // 关闭弹窗
            this.dialogVisible= false;
        },
        showDialogVisible() {
            this.dialogVisible = true;
      // 展示隐私
      this.showLang = this.lang;
      console.log(this.showLang);
      
      this.dialogVisible = true;
    },
    }
}
</script>
<style lang="scss" scoped>
.cookies_warp{
    width:100%;
    height: 100%;
    position: fixed;
    top: 0px;
    left:0;
    bottom:0;
    right: 0;
}
.cookies_content{
    width:700px;
    text-align: left;
    background: #fff;
    position: absolute;
    top:50%;
    left:50%;
    margin-top:-40px;
    transform: translate(-50%,-50%);
    box-sizing: border-box;
    padding:20px 30px;
    color:#333;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}
.cookies_title{
    font-size: 26px;
    font-weight: bold;
    margin-bottom:30px;
    position: relative;
    .closeBtn{
        position: absolute;
        right:0;
        font-size: 36px;
        width:25px;
        height: 25px;
        cursor: pointer;
        img{
            width:100%;
            height: 100%;
            display: block;
        }
    }
}
.cookies_submit{
    width:100px;
    padding:10px 15px;
    text-align: center;
    margin-top:30px;
    background: #409eff;
    border-radius: 5px;
    color:#fff;
    cursor: pointer;
}
.cookies_p{
    line-height: 1.5;
    margin-bottom:20px;
    font-size: 18px;
}
.cookies_last{
    line-height: 1.5;
    font-size: 14px;
    color:#999;
}
.cookies_btn{
    color:#409eff;
    cursor: pointer;
}
</style>
